using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class OR_OperStaffMap : EntityTypeConfiguration<OR_OperStaff>
    {
        public OR_OperStaffMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Note)
                .HasMaxLength(300);

            // Table & Column Mappings
            this.ToTable("OR_OperStaff");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Booking).HasColumnName("Booking");
            this.Property(t => t.StaffIID).HasColumnName("StaffIID");
            this.Property(t => t.Role).HasColumnName("Role");
            this.Property(t => t.Note).HasColumnName("Note");
        }
    }
}
